<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        function Persion(name, age) {
            this.name = name;
            this.age = age;
        }
        Persion.prototype.show = function () {
            console.log("姓名是：" +this.name + "的年龄是" + this.age);
        }
        var w = new Persion("小王", 20);
        w.show();
    </script>
</body>

</html>